package com.zyh.flink.day04;

import java.util.Objects;

public class Order {
    private String userNo;
    private String category;
    private Double money;//订单金额

    //有参无参构造方法，get、set、toString方法


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Order order = (Order) o;
        return Objects.equals(userNo, order.userNo) && Objects.equals(category, order.category) && Objects.equals(money, order.money);
    }

    @Override
    public int hashCode() {
        return Objects.hash(userNo, category, money);
    }

    @Override
    public String toString() {
        return "Order{" +
                "userNo='" + userNo + '\'' +
                ", category='" + category + '\'' +
                ", money=" + money +
                '}';
    }

    public String getUserNo() {
        return userNo;
    }

    public void setUserNo(String userNo) {
        this.userNo = userNo;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public Double getMoney() {
        return money;
    }

    public void setMoney(Double money) {
        this.money = money;
    }

    public Order() {
    }

    public Order(String userNo, String category, Double money) {
        this.userNo = userNo;
        this.category = category;
        this.money = money;
    }
}